package com.example.guiguihomemedical.controller;

import com.example.guiguihomemedical.common.Result;
import com.example.guiguihomemedical.entity.dto.RecordAdd;
import com.example.guiguihomemedical.service.RecordAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("recordadd")
public class RecordAddController {
    @Autowired
    private RecordAddService recordAddService;
    @PostMapping
    public Result addRecord(@RequestBody RecordAdd recordAdd){
        recordAddService.addRecord(recordAdd);
        return Result.success("建档成功！");
    }
}
